package org.jeeasy.generate.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.dromara.autotable.annotation.mysql.MysqlTypeConstant;
import org.dromara.mpe.autotable.annotation.Column;
import org.dromara.mpe.autotable.annotation.Table;
import org.jeeasy.common.core.base.BaseEntity;

/**
 * 代码生成模板
 *
 * @author wei.yang
 * @date 2023-12-17 14:56:27
 */
@Data
@Table(value = "gen_template", comment = "代码模板")
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class GenTemplate extends BaseEntity<GenTemplate> {

    /**
     * 模板名称
     */
    @Column(value = "name", length = 50, comment = "模板名称")
    private String name;

    /**
     * 文件名
     */
    @Column(value = "file_name", length = 50)
    private String fileName;

    /**
     * 模板内容
     */
    @Column(value = "content", type = MysqlTypeConstant.TEXT)
    //@TableField(typeHandler = ClobTypeHandler.class, jdbcType = JdbcType.CLOB)
    private String content;

    /**
     * 模板类型
     */
    @Column(value = "type", length = 16)
    private String type;

    /**
     * 排序
     */
    @Column(value = "sort_num", length = 4, decimalLength = 2, comment = "排序")
    private Double sortNum;

    /**
     * 启用标记
     */
    @Column(value = "enable_flag", length = 1, type = MysqlTypeConstant.TINYINT, defaultValue = "1")
    private Integer enableFlag;

    /**
     * 备注
     */
    @Column(value = "remark", length = 255)
    private String remark;

}
